home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Hash_EnumFirst C Library Procedures Hash_EnumFirst
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- Hash_EnumFirst, Hash_EnumNext - step through all the entries
- in a hash table
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<hhaasshh..hh>>
-
- Hash_Entry *
- HHaasshh__EEnnuummFFiirrsstt(_t_a_b_l_e_P_t_r, _s_e_a_r_c_h_P_t_r)
-
- Hash_Entry *
- HHaasshh__EEnnuummNNeexxtt(_s_e_a_r_c_h_P_t_r)
-
- AARRGGUUMMEENNTTSS
- Hash_Table *_t_a_b_l_e_P_t_r (in) Hash table whose
- entries are to be
- enumerated.
-
- Hash_Search *_s_e_a_r_c_h_P_t_r (in) Structure in which
- information can be
- stored about the state
- of the search between
- calls to HHaasshh__EEnnuummFFiirrsstt
- and/or HHaasshh__EEnnuummNNeexxtt.
-
- _________________________________________________________________
-
-
- DDEESSCCRRIIPPTTIIOONN
- HHaasshh__EEnnuummFFiirrsstt and HHaasshh__EEnnuummNNeexxtt permit each of the entries
- in a hash table to be examined in order. HHaasshh__EEnnuummFFiirrsstt
- returns the first entry in the given hash table and sets up
- the Hash_Search structure at *_s_e_a_r_c_h_P_t_r; if the table is
- empty it returns NULL. HHaasshh__EEnnuummNNeexxtt returns the next entry
- in the table using the information stored in *_s_e_a_r_c_h_P_t_r, and
- updates the contents of *_s_e_a_r_c_h_P_t_r; when the entire table
- has been scanned, it returns NULL. Entries are returned in
- order of their position in the table's buckets, which does
- not usually make any sense to the caller.
-
- A typical usage of these procedures is:
-
- Hash_Search search;
- Hash_Entry *entryPtr;
- Hash_Table table;
-
- ...
-
- for (entryPtr = Hash_EnumFirst(&table, &search);
- entryPtr != NULL; entryPtr = Hash_EnumNext(&search)) {
- ...
- }
-
-
-
- Sprite v.1.0 Printed: March 21, 1989 1
-
-
-
-
-
-
- Hash_EnumFirst C Library Procedures Hash_EnumFirst
-
-
-
- KKEEYYWWOORRDDSS
- enumerate, hash table
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v.1.0 Printed: March 21, 1989 2
-
-
-
-